<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./css.js/semantic.min.css">
    <script src="./css.js/jquery.min.js"></script>
    <script src="./css.js/semantic.min.js"></script>
    <script src="./css.js/template-web.js"></script>
    <script src="./css.js/index.js"></script>
    <title>Document</title>
</head>

<body>
    <h1>英雄列表</h1>
    <button class="ui primary button" id="add">添加英雄 </button>
    <!-- 表格 -->
    <table class="ui celled table">
        <thead>
            <tr>
                <th>编号</th>
                <th>英雄名称</th>
                <th>性别</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody id="all">

        </tbody>
    </table>

    <!-- 添加英雄弹出框 -->
    <div class="ui modal small">
        <div class="header">
            添加英雄
        </div>
        <div class="content">
            <form class="ui form">
                <div class="field">
                    <label>名称：</label>
                    <input type="text" name="name" placeholder="请输入英雄名称">
                </div>
                <div class="field">
                    <label>性别：</label>
                    <select name="gender" class="ui fluid dropdown">
                        <option value="男">男</option>
                        <option value="女">女</option>
                    </select>
                </div>
            </form>
        </div>
        <div class="actions">
            <div class="ui black deny button">
                取消
            </div>
            <div class="ui positive button" id="tianjia">
                添加
            </div>
        </div>
    </div>

    <script type="text/template" id="allHero">
        <% for(var i = 0 ; i<data.length ; i++){%>
        <tr>
            <td>
                <div class="ui ribbon label <%=data[i].isdel ? 'blue':'red'%>"><%=data[i].isdel ? '未删除':'已删除'%></div>
                <%=data[i].id%>
            </td>
            <td><%=data[i].name%></td>
            <td><%=data[i].gender%></td>
            <td><%=data[i].ctime%></td>
            <td>
                <a href="">编辑</a>
                <a href="">删除</a>
            </td>
        </tr>
        <% } %>
    </script>
</body>

</html>